<template>
	<view>
		<view class="" style="width: 100vw;" v-if="!emptyShow">
			<view class="edgeInsetTop"></view>
			<view class="wanl-goods-comment padding">
				<view class="">
					<text class="listt text-bold ">
						团长
						<text class="cuIcon-friend margin-left-sm"></text>
					</text>
					<block v-for="(item, index) in data" :key="index">
						<view class="list " style="margin-top: 20rpx;width: 40vw; " v-if="item.is_tuanzhang == 1">
							<text>{{ item }}</text>
						</view>
					</block>
				</view>
				<view class="">
					<text class="listt text-bold b ">
						普通用户
						<text class="cuIcon-friendadd margin-left-sm "></text>
					</text>
					<block v-for="(item, index) in data" :key="index">
						<view class="list b" style="margin-top: 20rpx;width: 40vw; " v-if="item.is_tuanzhang == 0">
							<text>{{ item.nickname }}</text>
						</view>
					</block>
				</view>
			</view>
		</view>
		<xw-empty :isShow="emptyShow" text="暂无相关订单数据" textColor="#777777"></xw-empty>
	</view>
</template>

<script>
import { mapState } from 'vuex';
import xwEmpty from '@/components/xw-empty/xw-empty';
export default {
	components: {
		xwEmpty,
	},
	computed: { ...mapState(['user']) },
	data() {
		return {
			data: [],
			show: '',
			emptyShow: false,
			listData: [], //列表
			reload: false, //判断是否上拉
			current_page: 1, //当前页码
			last_page: 1, //总页码
			status: 'loading',
			page: 1,
			pagesize: 50,
			contentText: {
				contentdown: ' ',
				contentrefresh: '加载中',
				contentnomore: '',
			},
		};
	},
	onLoad(option) {
		// this.loadData();
		this.getLiveList();
	},

	methods: {
		getLiveList() {
			this.$api('promote').then(res => {
				this.data = res.data.data;
				if (this.data.length == 0) {
					this.emptyShow = true;
				}
				console.log('-----------------------:>> ', res);
			});
		},
	},
};
</script>

<style lang="scss" scoped>
.wanl-goods-comment {
	display: flex;
	justify-content: space-between;
	width: 100vw;

	.text1 {
		color: #000;
		font-size: 35rpx;
		font-family: PingFang SC;
		font-weight: 600;
	}

	.text2 {
		color: #000;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
	}
}

.listt {
	width: 40vw;
	margin-top: 20rpx;
	padding: 10rpx 0;
	//width: 690rpx;
	//height: 120rpx;
	margin: 0 auto;
	border-radius: 20rpx;
	background: #ffede6;
	margin-bottom: 10rpx;
	display: flex;
	align-items: center;
	justify-content: space-around;
	font-size: 33rpx;
}

.list {
	margin-top: 20rpx;
	padding: 10rpx 0;
	width: 690rpx;
	//height: 120rpx;
	margin: 0 auto;
	border-radius: 20rpx;
	background: #ffede6;
	margin-bottom: 10rpx;
	display: flex;
	align-items: center;
	justify-content: space-around;
}
</style>
